load("@fbcode_macros//build_defs:rust_binary.bzl", "rust_binary")
load("@fbcode_macros//build_defs:rust_library.bzl", "rust_library")
load("@fbsource//tools/build_defs:glob_defs.bzl", "glob")

oncall("buck2")

rust_library(
    name = "lock_free_hashtable",
    srcs = glob(["src/**/*.rs"]),
    crate_root = "src/lib.rs",
    deps = [
        "fbsource//third-party/rust:atomic",
        "fbsource//third-party/rust:parking_lot",
        "//buck2/allocative/allocative:allocative",
    ],
)

rust_binary(
    name = "stress",
    srcs = ["examples/stress.rs"],
    deps = [
        "fbsource//third-party/rust:num_cpus",
        ":lock_free_hashtable",
    ],
)
